import api from "./api"

import axios from "../../../axios";
import { data } from "browserslist";

// export const homeList = (params) => {
//   return axios({
//     method: "get",
//     url: api.home.homeList,
//     params
//   })
// }
export const banner = (params) => {
  return axios({
    method: 'get',
    url: api.hospital.banner,
    params
  })
}
export const hospitallist = (params) => {
  return axios({
    method: "get",
    url: api.hospital.hospitallist,
    params
  })
}
// 详情
export const hospitalid = (id) => {
  return axios({
    method: 'get',
    url: `${api.hospital.hospitalid}+${id}`,
  })
}
// 当前用户下的就诊卡片
export const patientList = () => {
  return axios({
    method: 'get',
    url: api.hospital.patientList,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}
// 创建新的就诊人信息
export const addpatient = (data) => {
  return axios({
    method: 'post',
    url: api.hospital.addpatient,
    data,
    headers: {
      "Authorization": window.localStorage.getItem('token')
    }
  })
}

// 科室分类
export const category = (params) => {
  return axios({
    method: 'get',
    url: api.hospital.category,
    params,
    headers: {
      "Authorization": window.localStorage.getItem("token")
      
    }
  })
}
// 字典的查寻
export const dict = (id) => {
  return axios({
    method: 'get',
    url: `${api.hospital.dict}+${id}`,
    headers: {
      "Authorization": window.localStorage.getItem("token")
      
    }
  })
}